home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / u_man / cat3 / Tk / configwidg.z / configwidg
Encoding:
Text File  |  2002-10-03  |  49.7 KB  |  727 lines

  1.  
  2.  
  3.  
  4. TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt((((3333TTTTkkkk))))                                TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt((((3333TTTTkkkk))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      Tk_ConfigureWidget, Tk_Offset, Tk_ConfigureInfo, Tk_ConfigureValue,
  10.      Tk_FreeOptions - process configuration options for widgets
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ttttkkkk....hhhh>>>>
  14.  
  15.      int
  16.      TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt((((_i_n_t_e_r_p, _t_k_w_i_n, _s_p_e_c_s, _a_r_g_c, _a_r_g_v, _w_i_d_g_R_e_c, _f_l_a_g_s))))
  17.  
  18.      int
  19.      TTTTkkkk____OOOOffffffffsssseeeetttt((((_t_y_p_e, _f_i_e_l_d))))
  20.  
  21.      int
  22.      TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeIIIInnnnffffoooo((((_i_n_t_e_r_p, _t_k_w_i_n, _s_p_e_c_s, _w_i_d_g_R_e_c, _a_r_g_v_N_a_m_e, _f_l_a_g_s))))
  23.  
  24.      int                                                                      |
  25.      TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeVVVVaaaalllluuuueeee((((_i_n_t_e_r_p, _t_k_w_i_n, _s_p_e_c_s, _w_i_d_g_R_e_c, _a_r_g_v_N_a_m_e, _f_l_a_g_s))))        |
  26.  
  27.      TTTTkkkk____FFFFrrrreeeeeeeeOOOOppppttttiiiioooonnnnssss((((_s_p_e_c_s, _w_i_d_g_R_e_c, _d_i_s_p_l_a_y, _f_l_a_g_s))))
  28.  
  29. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  30.      Tcl_Interp      *_i_n_t_e_r_p    (in)      Interpreter to use for returning
  31.                                           error messages.
  32.  
  33.      Tk_Window       _t_k_w_i_n      (in)      Window used to represent widget
  34.                                           (needed to set up X resources).
  35.  
  36.      Tk_ConfigSpec   *_s_p_e_c_s     (in)      Pointer to table specifying legal
  37.                                           configuration options for this
  38.                                           widget.
  39.  
  40.      int             _a_r_g_c       (in)      Number of arguments in _a_r_g_v.
  41.  
  42.      char            **_a_r_g_v     (in)      Command-line options for configuring
  43.                                           widget.
  44.  
  45.      char            *_w_i_d_g_R_e_c   (in/out)  Points to widget record structure.
  46.                                           Fields in this structure get
  47.                                           modified by TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt to
  48.                                           hold configuration information.
  49.  
  50.      int             _f_l_a_g_s      (in)      If non-zero, then it specifies an
  51.                                           OR-ed combination of flags that
  52.                                           control the processing of
  53.                                           configuration information.
  54.                                           TK_CONFIG_ARGV_ONLY causes the
  55.                                           option database and defaults to be
  56.                                           ignored, and flag bits
  57.                                           TK_CONFIG_USER_BIT and higher are
  58.                                           used to selectively disable entries
  59.                                           in _s_p_e_c_s.
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt((((3333TTTTkkkk))))                                TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt((((3333TTTTkkkk))))
  71.  
  72.  
  73.  
  74.      type name       _t_y_p_e       (in)      The name of the type of a widget
  75.                                           record.
  76.  
  77.      field name      _f_i_e_l_d      (in)      The name of a field in records of
  78.                                           type _t_y_p_e.
  79.  
  80.      char            *_a_r_g_v_N_a_m_e  (in)      The name used on Tcl command lines
  81.                                           to refer to a particular option
  82.                                           (e.g. when creating a widget or
  83.                                           invoking the ccccoooonnnnffffiiiigggguuuurrrreeee widget
  84.                                           command).  If non-NULL, then
  85.                                           information is returned only for
  86.                                           this option.  If NULL, then
  87.                                           information is returned for all
  88.                                           available options.
  89.  
  90.      Display         *_d_i_s_p_l_a_y   (in)      Display containing widget whose
  91.                                           record is being freed;  needed in
  92.                                           order to free up resources.
  93.  
  94. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  95.      TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt is called to configure various aspects of a widget,
  96.      such as colors, fonts, border width, etc.  It is intended as a
  97.      convenience procedure to reduce the amount of code that must be written
  98.      in individual widget managers to handle configuration information.  It is
  99.      typically invoked when widgets are created, and again when the ccccoooonnnnffffiiiigggguuuurrrreeee
  100.      command is invoked for a widget.  Although intended primarily for
  101.      widgets, TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt can be used in other situations where _a_r_g_c-
  102.      _a_r_g_v information is to be used to fill in a record structure, such as
  103.      configuring graphical elements for a canvas widget or entries of a menu.
  104.  
  105.      TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt processes a table specifying the configuration options
  106.      that are supported (_s_p_e_c_s) and a collection of command-line arguments
  107.      (_a_r_g_c and _a_r_g_v) to fill in fields of a record (_w_i_d_g_R_e_c).  It uses the
  108.      option database and defaults specified in _s_p_e_c_s to fill in fields of
  109.      _w_i_d_g_R_e_c that are not specified in _a_r_g_v.  TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt normally
  110.      returns the value TCL_OK; in this case it does not modify _i_n_t_e_r_p.  If an
  111.      error occurs then TCL_ERROR is returned and TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt will leave
  112.      an error message in _i_n_t_e_r_p->_r_e_s_u_l_t in the standard Tcl fashion.  In the
  113.      event of an error return, some of the fields of _w_i_d_g_R_e_c could already
  114.      have been set, if configuration information for them was successfully
  115.      processed before the error occurred.  The other fields will be set to
  116.      reasonable initial values so that TTTTkkkk____FFFFrrrreeeeeeeeOOOOppppttttiiiioooonnnnssss can be called for
  117.      cleanup.
  118.  
  119.      The _s_p_e_c_s array specifies the kinds of configuration options expected by
  120.      the widget.  Each of its entries specifies one configuration option and
  121.      has the following structure:
  122.  
  123.           typedef struct {
  124.               int _t_y_p_e;
  125.               char *_a_r_g_v_N_a_m_e;
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt((((3333TTTTkkkk))))                                TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt((((3333TTTTkkkk))))
  137.  
  138.  
  139.  
  140.              char *_d_b_N_a_m_e;
  141.               char *_d_b_C_l_a_s_s;
  142.               char *_d_e_f_V_a_l_u_e;
  143.               int _o_f_f_s_e_t;
  144.               int _s_p_e_c_F_l_a_g_s;
  145.               Tk_CustomOption *_c_u_s_t_o_m_P_t_r;
  146.           } Tk_ConfigSpec;
  147.  
  148.  
  149.      The _t_y_p_e field indicates what type of configuration option this is (e.g.
  150.      TK_CONFIG_COLOR for a color value, or TK_CONFIG_INT for an integer
  151.      value).  The _t_y_p_e field indicates how to use the value of the option
  152.      (more on this below).  The _a_r_g_v_N_a_m_e field is a string such as ``-font''
  153.      or ``-bg'', which is compared with the values in _a_r_g_v (if _a_r_g_v_N_a_m_e is
  154.      NULL it means this is a grouped entry;  see GROUPED ENTRIES below).  The
  155.      _d_b_N_a_m_e and _d_b_C_l_a_s_s fields are used to look up a value for this option in
  156.      the option database.  The _d_e_f_V_a_l_u_e field specifies a default value for
  157.      this configuration option if no value is specified in either _a_r_g_v or the
  158.      option database.  _O_f_f_s_e_t indicates where in _w_i_d_g_R_e_c to store information
  159.      about this option, and _s_p_e_c_F_l_a_g_s contains additional information to
  160.      control the processing of this configuration option (see FLAGS below).
  161.      The last field, _c_u_s_t_o_m_P_t_r, is only used if _t_y_p_e is TK_CONFIG_CUSTOM;  see
  162.      CUSTOM OPTION TYPES below.
  163.  
  164.      TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt first processes _a_r_g_v to see which (if any)
  165.      configuration options are specified there.  _A_r_g_v must contain an even
  166.      number of fields;  the first of each pair of fields must match the
  167.      _a_r_g_v_N_a_m_e of some entry in _s_p_e_c_s (unique abbreviations are acceptable),
  168.      and the second field of the pair contains the value for that
  169.      configuration option.  If there are entries in _s_p_e_c for which there were
  170.      no matching entries in _a_r_g_v, TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt uses the _d_b_N_a_m_e and
  171.      _d_b_C_l_a_s_s fields of the _s_p_e_c_s entry to probe the option database;  if a
  172.      value is found, then it is used as the value for the option.  Finally, if
  173.      no entry is found in the option database, the _d_e_f_V_a_l_u_e field of the _s_p_e_c_s
  174.      entry is used as the value for the configuration option.  If the _d_e_f_V_a_l_u_e
  175.      is NULL, or if the TK_CONFIG_DONT_SET_DEFAULT bit is set in _f_l_a_g_s, then
  176.      there is no default value and this _s_p_e_c_s entry will be ignored if no
  177.      value is specified in _a_r_g_v or the option database.
  178.  
  179.      Once a string value has been determined for a configuration option,
  180.      TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt translates the string value into a more useful form,
  181.      such as a color if _t_y_p_e is TK_CONFIG_COLOR or an integer if _t_y_p_e is
  182.      TK_CONFIG_INT.  This value is then stored in the record pointed to by
  183.      _w_i_d_g_R_e_c.  This record is assumed to contain information relevant to the
  184.      manager of the widget;  its exact type is unknown to TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt.
  185.      The _o_f_f_s_e_t field of each _s_p_e_c_s entry indicates where in _w_i_d_g_R_e_c to store
  186.      the information about this configuration option.  You should use the
  187.      TTTTkkkk____OOOOffffffffsssseeeetttt macro to generate _o_f_f_s_e_t values (see below for a description of
  188.      TTTTkkkk____OOOOffffffffsssseeeetttt).  The location indicated by _w_i_d_g_R_e_c and _o_f_f_s_e_t will be
  189.      referred to as the ``target'' in the descriptions below.
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt((((3333TTTTkkkk))))                                TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt((((3333TTTTkkkk))))
  203.  
  204.  
  205.  
  206.      The _t_y_p_e field of each entry in _s_p_e_c_s determines what to do with the
  207.      string value of that configuration option.  The legal values for _t_y_p_e,
  208.      and the corresponding actions, are:
  209.  
  210.      TTTTKKKK____CCCCOOOONNNNFFFFIIIIGGGG____AAAACCCCTTTTIIIIVVVVEEEE____CCCCUUUURRRRSSSSOOOORRRR
  211.           The value must be an ASCII string identifying a cursor in a form
  212.           suitable for passing to TTTTkkkk____GGGGeeeettttCCCCuuuurrrrssssoooorrrr. The value is converted to a
  213.           CCCCuuuurrrrssssoooorrrr by calling TTTTkkkk____GGGGeeeettttCCCCuuuurrrrssssoooorrrr and the result is stored in the
  214.           target.  In addition, the resulting cursor is made the active cursor
  215.           for _t_k_w_i_n by calling XXXXDDDDeeeeffffiiiinnnneeeeCCCCuuuurrrrssssoooorrrr.  If TK_CONFIG_NULL_OK is
  216.           specified in _s_p_e_c_F_l_a_g_s then the value may be an empty string, in
  217.           which case the target and _t_k_w_i_n's active cursor will be set to NNNNoooonnnneeee.
  218.           If the previous value of the target wasn't NNNNoooonnnneeee, then it is freed by
  219.           passing it to TTTTkkkk____FFFFrrrreeeeeeeeCCCCuuuurrrrssssoooorrrr.
  220.  
  221.      TTTTKKKK____CCCCOOOONNNNFFFFIIIIGGGG____AAAANNNNCCCCHHHHOOOORRRR
  222.           The value must be an ASCII string identifying an anchor point in one
  223.           of the ways accepted by TTTTkkkk____GGGGeeeettttAAAAnnnncccchhhhoooorrrr.  The string is converted to a
  224.           TTTTkkkk____AAAAnnnncccchhhhoooorrrr by calling TTTTkkkk____GGGGeeeettttAAAAnnnncccchhhhoooorrrr and the result is stored in the
  225.           target.
  226.  
  227.      TTTTKKKK____CCCCOOOONNNNFFFFIIIIGGGG____BBBBIIIITTTTMMMMAAAAPPPP
  228.           The value must be an ASCII string identifying a bitmap in a form
  229.           suitable for passing to TTTTkkkk____GGGGeeeettttBBBBiiiittttmmmmaaaapppp.  The value is converted to a
  230.           PPPPiiiixxxxmmmmaaaapppp by calling TTTTkkkk____GGGGeeeettttBBBBiiiittttmmmmaaaapppp and the result is stored in the
  231.           target.  If TK_CONFIG_NULL_OK is specified in _s_p_e_c_F_l_a_g_s then the
  232.           value may be an empty string, in which case the target is set to
  233.           NNNNoooonnnneeee.  If the previous value of the target wasn't NNNNoooonnnneeee, then it is
  234.           freed by passing it to TTTTkkkk____FFFFrrrreeeeeeeeBBBBiiiittttmmmmaaaapppp.
  235.  
  236.      TTTTKKKK____CCCCOOOONNNNFFFFIIIIGGGG____BBBBOOOOOOOOLLLLEEEEAAAANNNN
  237.           The value must be an ASCII string specifying a boolean value.  Any
  238.           of the values ``true'', ``yes'', ``on'', or ``1'', or an
  239.           abbreviation of one of these values, means true; any of the values
  240.           ``false'', ``no'', ``off'', or ``0'', or an abbreviation of one of
  241.           these values, means false.  The target is expected to be an integer;
  242.           for true values it will be set to 1 and for false values it will be
  243.           set to 0.
  244.  
  245.      TTTTKKKK____CCCCOOOONNNNFFFFIIIIGGGG____BBBBOOOORRRRDDDDEEEERRRR
  246.           The value must be an ASCII string identifying a border color in a
  247.           form suitable for passing to TTTTkkkk____GGGGeeeetttt3333DDDDBBBBoooorrrrddddeeeerrrr.  The value is converted
  248.           to a (TTTTkkkk____3333DDDDBBBBoooorrrrddddeeeerrrr ****) by calling TTTTkkkk____GGGGeeeetttt3333DDDDBBBBoooorrrrddddeeeerrrr and the result is
  249.           stored in the target.  If TK_CONFIG_NULL_OK is specified in
  250.           _s_p_e_c_F_l_a_g_s then the value may be an empty string, in which case the
  251.           target will be set to NULL.  If the previous value of the target
  252.           wasn't NULL, then it is freed by passing it to TTTTkkkk____FFFFrrrreeeeeeee3333DDDDBBBBoooorrrrddddeeeerrrr.
  253.  
  254.      TTTTKKKK____CCCCOOOONNNNFFFFIIIIGGGG____CCCCAAAAPPPP____SSSSTTTTYYYYLLLLEEEE
  255.           The value must be an ASCII string identifying a cap style in one of
  256.           the ways accepted by TTTTkkkk____GGGGeeeettttCCCCaaaappppSSSSttttyyyylllleeee.  The string is converted to an
  257.           integer value corresponding to the cap style by calling
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt((((3333TTTTkkkk))))                                TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt((((3333TTTTkkkk))))
  269.  
  270.  
  271.  
  272.           TTTTkkkk____GGGGeeeettttCCCCaaaappppSSSSttttyyyylllleeee and the result is stored in the target.
  273.  
  274.      TTTTKKKK____CCCCOOOONNNNFFFFIIIIGGGG____CCCCOOOOLLLLOOOORRRR
  275.           The value must be an ASCII string identifying a color in a form
  276.           suitable for passing to TTTTkkkk____GGGGeeeettttCCCCoooolllloooorrrr.  The value is converted to an
  277.           (XXXXCCCCoooolllloooorrrr ****) by calling TTTTkkkk____GGGGeeeettttCCCCoooolllloooorrrr and the result is stored in the
  278.           target.  If TK_CONFIG_NULL_OK is specified in _s_p_e_c_F_l_a_g_s then the
  279.           value may be an empty string, in which case the target will be set
  280.           to NNNNoooonnnneeee.  If the previous value of the target wasn't NULL, then it
  281.           is freed by passing it to TTTTkkkk____FFFFrrrreeeeeeeeCCCCoooolllloooorrrr.
  282.  
  283.      TTTTKKKK____CCCCOOOONNNNFFFFIIIIGGGG____CCCCUUUURRRRSSSSOOOORRRR
  284.           This option is identical to TTTTKKKK____CCCCOOOONNNNFFFFIIIIGGGG____AAAACCCCTTTTIIIIVVVVEEEE____CCCCUUUURRRRSSSSOOOORRRR except that the
  285.           new cursor is not made the active one for _t_k_w_i_n.
  286.  
  287.      TTTTKKKK____CCCCOOOONNNNFFFFIIIIGGGG____CCCCUUUUSSSSTTTTOOOOMMMM
  288.           This option allows applications to define new option types.  The
  289.           _c_u_s_t_o_m_P_t_r field of the entry points to a structure defining the new
  290.           option type.  See the section CUSTOM OPTION TYPES below for details.
  291.  
  292.      TTTTKKKK____CCCCOOOONNNNFFFFIIIIGGGG____DDDDOOOOUUUUBBBBLLLLEEEE
  293.           The value must be an ASCII floating-point number in the format
  294.           accepted by ssssttttrrrrttttoooollll.  The string is converted to a ddddoooouuuubbbblllleeee value, and
  295.           the value is stored in the target.
  296.  
  297.      TTTTKKKK____CCCCOOOONNNNFFFFIIIIGGGG____EEEENNNNDDDD
  298.           Marks the end of the table.  The last entry in _s_p_e_c_s must have this
  299.           type;  all of its other fields are ignored and it will never match
  300.           any arguments.
  301.  
  302.      TTTTKKKK____CCCCOOOONNNNFFFFIIIIGGGG____FFFFOOOONNNNTTTT
  303.           The value must be an ASCII string identifying a font in a form
  304.           suitable for passing to TTTTkkkk____GGGGeeeettttFFFFoooonnnnttttSSSSttttrrrruuuucccctttt.  The value is converted to
  305.           an (XXXXFFFFoooonnnnttttSSSSttttrrrruuuucccctttt ****) by calling TTTTkkkk____GGGGeeeettttFFFFoooonnnnttttSSSSttttrrrruuuucccctttt and the result is
  306.           stored in the target.  If TK_CONFIG_NULL_OK is specified in
  307.           _s_p_e_c_F_l_a_g_s then the value may be an empty string, in which case the
  308.           target will be set to NULL.  If the previous value of the target
  309.           wasn't NULL, then it is freed by passing it to TTTTkkkk____FFFFrrrreeeeeeeeFFFFoooonnnnttttSSSSttttrrrruuuucccctttt.
  310.  
  311.      TTTTKKKK____CCCCOOOONNNNFFFFIIIIGGGG____IIIINNNNTTTT
  312.           The value must be an ASCII integer string in the format accepted by
  313.           ssssttttrrrrttttoooollll (e.g. ``0'' and ``0x'' prefixes may be used to specify octal
  314.           or hexadecimal numbers, respectively).  The string is converted to
  315.           an integer value and the integer is stored in the target.
  316.  
  317.      TTTTKKKK____CCCCOOOONNNNFFFFIIIIGGGG____JJJJOOOOIIIINNNN____SSSSTTTTYYYYLLLLEEEE
  318.           The value must be an ASCII string identifying a join style in one of
  319.           the ways accepted by TTTTkkkk____GGGGeeeettttJJJJooooiiiinnnnSSSSttttyyyylllleeee.  The string is converted to an
  320.           integer value corresponding to the join style by calling
  321.           TTTTkkkk____GGGGeeeettttJJJJooooiiiinnnnSSSSttttyyyylllleeee and the result is stored in the target.
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt((((3333TTTTkkkk))))                                TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt((((3333TTTTkkkk))))
  335.  
  336.  
  337.  
  338.      TTTTKKKK____CCCCOOOONNNNFFFFIIIIGGGG____JJJJUUUUSSSSTTTTIIIIFFFFYYYY
  339.           The value must be an ASCII string identifying a justification method
  340.           in one of the ways accepted by TTTTkkkk____GGGGeeeettttJJJJuuuussssttttiiiiffffyyyy.  The string is
  341.           converted to a TTTTkkkk____JJJJuuuussssttttiiiiffffyyyy by calling TTTTkkkk____GGGGeeeettttJJJJuuuussssttttiiiiffffyyyy and the result is
  342.           stored in the target.
  343.  
  344.      TTTTKKKK____CCCCOOOONNNNFFFFIIIIGGGG____MMMMMMMM
  345.           The value must specify a screen distance in one of the forms
  346.           acceptable to TTTTkkkk____GGGGeeeettttSSSSccccrrrreeeeeeeennnnMMMMMMMM.  The string is converted to double-
  347.           precision floating-point distance in millimeters and the value is
  348.           stored in the target.
  349.  
  350.      TTTTKKKK____CCCCOOOONNNNFFFFIIIIGGGG____PPPPIIIIXXXXEEEELLLLSSSS
  351.           The value must specify screen units in one of the forms acceptable
  352.           to TTTTkkkk____GGGGeeeettttPPPPiiiixxxxeeeellllssss.  The string is converted to an integer distance in
  353.           pixels and the value is stored in the target.
  354.  
  355.      TTTTKKKK____CCCCOOOONNNNFFFFIIIIGGGG____RRRREEEELLLLIIIIEEEEFFFF
  356.           The value must be an ASCII string identifying a relief in a form
  357.           suitable for passing to TTTTkkkk____GGGGeeeettttRRRReeeelllliiiieeeeffff.  The value is converted to an
  358.           integer relief value by calling TTTTkkkk____GGGGeeeettttRRRReeeelllliiiieeeeffff and the result is
  359.           stored in the target.
  360.  
  361.      TTTTKKKK____CCCCOOOONNNNFFFFIIIIGGGG____SSSSTTTTRRRRIIIINNNNGGGG
  362.           A copy of the value is made by allocating memory space with mmmmaaaalllllllloooocccc
  363.           and copying the value into the dynamically-allocated space.  A
  364.           pointer to the new string is stored in the target.  If
  365.           TK_CONFIG_NULL_OK is specified in _s_p_e_c_F_l_a_g_s then the value may be an
  366.           empty string, in which case the target will be set to NULL.  If the
  367.           previous value of the target wasn't NULL, then it is freed by
  368.           passing it to ffffrrrreeeeeeee.
  369.  
  370.      TTTTKKKK____CCCCOOOONNNNFFFFIIIIGGGG____SSSSYYYYNNNNOOOONNNNYYYYMMMM
  371.           This _t_y_p_e value identifies special entries in _s_p_e_c_s that are
  372.           synonyms for other entries.  If an _a_r_g_v value matches the _a_r_g_v_N_a_m_e
  373.           of a TK_CONFIG_SYNONYM entry, the entry isn't used directly.
  374.           Instead, TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt searches _s_p_e_c_s for another entry whose
  375.           _a_r_g_v_N_a_m_e is the same as the _d_b_N_a_m_e field in the TK_CONFIG_SYNONYM
  376.           entry;  this new entry is used just as if its _a_r_g_v_N_a_m_e had matched
  377.           the _a_r_g_v value.  The synonym mechanism allows multiple _a_r_g_v values
  378.           to be used for a single configuration option, such as
  379.           ``-background'' and ``-bg''.
  380.  
  381.      TTTTKKKK____CCCCOOOONNNNFFFFIIIIGGGG____UUUUIIIIDDDD
  382.           The value is translated to a TTTTkkkk____UUUUiiiidddd (by passing it to TTTTkkkk____GGGGeeeettttUUUUiiiidddd).
  383.           The resulting value is stored in the target.  If TK_CONFIG_NULL_OK
  384.           is specified in _s_p_e_c_F_l_a_g_s and the value is an empty string then the
  385.           target will be set to NULL.
  386.  
  387.      TTTTKKKK____CCCCOOOONNNNFFFFIIIIGGGG____WWWWIIIINNNNDDDDOOOOWWWW
  388.           The value must be a window path name.  It is translated to a
  389.           TTTTkkkk____WWWWiiiinnnnddddoooowwww token and the token is stored in the target.
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt((((3333TTTTkkkk))))                                TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt((((3333TTTTkkkk))))
  401.  
  402.  
  403.  
  404. GGGGRRRROOOOUUUUPPPPEEEEDDDD EEEENNNNTTTTRRRRIIIIEEEESSSS
  405.      In some cases it is useful to generate multiple resources from a single
  406.      configuration value.  For example, a color name might be used both to
  407.      generate the background color for a widget (using TK_CONFIG_COLOR) and to
  408.      generate a 3-D border to draw around the widget (using TK_CONFIG_BORDER).
  409.      In cases like this it is possible to specify that several consecutive
  410.      entries in _s_p_e_c_s are to be treated as a group.  The first entry is used
  411.      to determine a value (using its _a_r_g_v_N_a_m_e, _d_b_N_a_m_e, _d_b_C_l_a_s_s, and _d_e_f_V_a_l_u_e
  412.      fields).  The value will be processed several times (one for each entry
  413.      in the group), generating multiple different resources and modifying
  414.      multiple targets within _w_i_d_g_R_e_c.  Each of the entries after the first
  415.      must have a NULL value in its _a_r_g_v_N_a_m_e field;  this indicates that the
  416.      entry is to be grouped with the entry that precedes it.  Only the _t_y_p_e
  417.      and _o_f_f_s_e_t fields are used from these follow-on entries.
  418.  
  419.  
  420. FFFFLLLLAAAAGGGGSSSS
  421.      The _f_l_a_g_s argument passed to TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt is used in conjunction
  422.      with the _s_p_e_c_F_l_a_g_s fields in the entries of _s_p_e_c_s to provide additional
  423.      control over the processing of configuration options.  These values are
  424.      used in three different ways as described below.
  425.  
  426.      First, if the _f_l_a_g_s argument to TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt has the
  427.      TK_CONFIG_ARGV_ONLY bit set (i.e., _f_l_a_g_s | TK_CONFIG_ARGV_ONLY != 0),
  428.      then the option database and _d_e_f_V_a_l_u_e fields are not used.  In this case,
  429.      if an entry in _s_p_e_c_s doesn't match a field in _a_r_g_v then nothing happens:
  430.      the corresponding target isn't modified.  This feature is useful when the
  431.      goal is to modify certain configuration options while leaving others in
  432.      their current state, such as when a ccccoooonnnnffffiiiigggguuuurrrreeee widget command is being
  433.      processed.
  434.  
  435.      Second, the _s_p_e_c_F_l_a_g_s field of an entry in _s_p_e_c_s may be used to control
  436.      the processing of that entry.  Each _s_p_e_c_F_l_a_g_s field may consists of an
  437.      OR-ed combination of the following values:
  438.  
  439.      TTTTKKKK____CCCCOOOONNNNFFFFIIIIGGGG____CCCCOOOOLLLLOOOORRRR____OOOONNNNLLLLYYYY
  440.           If this bit is set then the entry will only be considered if the
  441.           display for _t_k_w_i_n has more than one bit plane.  If the display is
  442.           monochromatic then this _s_p_e_c_s entry will be ignored.
  443.  
  444.      TTTTKKKK____CCCCOOOONNNNFFFFIIIIGGGG____MMMMOOOONNNNOOOO____OOOONNNNLLLLYYYY
  445.           If this bit is set then the entry will only be considered if the
  446.           display for _t_k_w_i_n has exactly one bit plane.  If the display is not
  447.           monochromatic then this _s_p_e_c_s entry will be ignored.
  448.  
  449.      TTTTKKKK____CCCCOOOONNNNFFFFIIIIGGGG____NNNNUUUULLLLLLLL____OOOOKKKK
  450.           This bit is only relevant for some types of entries (see the
  451.           descriptions of the various entry types above).  If this bit is set,
  452.           it indicates that an empty string value for the field is acceptable
  453.           and if it occurs then the target should be set to NULL or NNNNoooonnnneeee,
  454.           depending on the type of the target.  This flag is typically used to
  455.           allow a feature to be turned off entirely, e.g. set a cursor value
  456.  
  457.  
  458.  
  459.                                                                         PPPPaaaaggggeeee 7777
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466. TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt((((3333TTTTkkkk))))                                TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt((((3333TTTTkkkk))))
  467.  
  468.  
  469.  
  470.           to NNNNoooonnnneeee so that a window simply inherits its parent's cursor.  If
  471.           this bit isn't set then empty strings are processed as strings,
  472.           which generally results in an error.
  473.  
  474.      TTTTKKKK____CCCCOOOONNNNFFFFIIIIGGGG____DDDDOOOONNNNTTTT____SSSSEEEETTTT____DDDDEEEEFFFFAAAAUUUULLLLTTTT
  475.           If this bit is one, it means that the _d_e_f_V_a_l_u_e field of the entry
  476.           should only be used for returning the default value in
  477.           TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeIIIInnnnffffoooo.  In calls to TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt no default will be
  478.           supplied for entries with this flag set;  it is assumed that the
  479.           caller has already supplied a default value in the target location.
  480.           This flag provides a performance optimization where it is expensive
  481.           to process the default string:  the client can compute the default
  482.           once, save the value, and provide it before calling
  483.           TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt.
  484.  
  485.      TTTTKKKK____CCCCOOOONNNNFFFFIIIIGGGG____OOOOPPPPTTTTIIIIOOOONNNN____SSSSPPPPEEEECCCCIIIIFFFFIIIIEEEEDDDD
  486.           This bit is set and cleared by TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt.  Whenever
  487.           TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt returns, this bit will be set in all the entries
  488.           where a value was specified in _a_r_g_v.  It will be zero in all other
  489.           entries.  This bit provides a way for clients to determine which
  490.           values actually changed in a call to TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt.
  491.  
  492.      The TK_CONFIG_MONO_ONLY and TK_CONFIG_COLOR_ONLY flags are typically used
  493.      to specify different default values for monochrome and color displays.
  494.      This is done by creating two entries in _s_p_e_c_s that are identical except
  495.      for their _d_e_f_V_a_l_u_e and _s_p_e_c_F_l_a_g_s fields.  One entry should have the value
  496.      TK_CONFIG_MONO_ONLY in its _s_p_e_c_F_l_a_g_s and the default value for monochrome
  497.      displays in its _d_e_f_V_a_l_u_e;  the other entry entry should have the value
  498.      TK_CONFIG_COLOR_ONLY in its _s_p_e_c_F_l_a_g_s and the appropriate _d_e_f_V_a_l_u_e for
  499.      color displays.
  500.  
  501.      Third, it is possible to use _f_l_a_g_s and _s_p_e_c_F_l_a_g_s together to selectively
  502.      disable some entries.  This feature is not needed very often.  It is
  503.      useful in cases where several similar kinds of widgets are implemented in
  504.      one place.  It allows a single _s_p_e_c_s table to be created with all the
  505.      configuration options for all the widget types.  When processing a
  506.      particular widget type, only entries relevant to that type will be used.
  507.      This effect is achieved by setting the high-order bits (those in
  508.      positions equal to or greater than TK_CONFIG_USER_BIT) in _s_p_e_c_F_l_a_g_s
  509.      values or in _f_l_a_g_s.  In order for a particular entry in _s_p_e_c_s to be used,
  510.      its high-order bits must match exactly the high-order bits of the _f_l_a_g_s
  511.      value passed to TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt.  If a _s_p_e_c_s table is being used for N
  512.      different widget types, then N of the high-order bits will be used.  Each
  513.      _s_p_e_c_s entry will have one of more of those bits set in its _s_p_e_c_F_l_a_g_s
  514.      field to indicate the widget types for which this entry is valid.  When
  515.      calling TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt, _f_l_a_g_s will have a single one of these bits
  516.      set to select the entries for the desired widget type.  For a working
  517.      example of this feature, see the code in tkButton.c.
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.                                                                         PPPPaaaaggggeeee 8888
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532. TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt((((3333TTTTkkkk))))                                TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt((((3333TTTTkkkk))))
  533.  
  534.  
  535.  
  536. TTTTKKKK____OOOOFFFFFFFFSSSSEEEETTTT
  537.      The TTTTkkkk____OOOOffffffffsssseeeetttt macro is provided as a safe way of generating the _o_f_f_s_e_t
  538.      values for entries in Tk_ConfigSpec structures.  It takes two arguments:
  539.      the name of a type of record, and the name of a field in that record.  It
  540.      returns the byte offset of the named field in records of the given type.
  541.  
  542.  
  543. TTTTKKKK____CCCCOOOONNNNFFFFIIIIGGGGUUUURRRREEEEIIIINNNNFFFFOOOO
  544.      The TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeIIIInnnnffffoooo procedure may be used to obtain information about
  545.      one or all of the options for a given widget.  Given a token for a window
  546.      (_t_k_w_i_n), a table describing the configuration options for a class of
  547.      widgets (_s_p_e_c_s), a pointer to a widget record containing the current
  548.      information for a widget (_w_i_d_g_R_e_c), and a NULL _a_r_g_v_N_a_m_e argument,
  549.      TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeIIIInnnnffffoooo generates a string describing all of the configuration
  550.      options for the window.  The string is placed in _i_n_t_e_r_p->_r_e_s_u_l_t.  Under
  551.      normal circumstances it returns TCL_OK;  if an error occurs then it
  552.      returns TCL_ERROR and _i_n_t_e_r_p->_r_e_s_u_l_t contains an error message.
  553.  
  554.      If _a_r_g_v_N_a_m_e is NULL, then the value left in _i_n_t_e_r_p->_r_e_s_u_l_t by
  555.      TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeIIIInnnnffffoooo consists of a list of one or more entries, each of which
  556.      describes one configuration option (i.e. one entry in _s_p_e_c_s).  Each entry
  557.      in the list will contain either two or five values.  If the corresponding
  558.      entry in _s_p_e_c_s has type TK_CONFIG_SYNONYM, then the list will contain two
  559.      values:  the _a_r_g_v_N_a_m_e for the entry and the _d_b_N_a_m_e (synonym name).
  560.      Otherwise the list will contain five values:  _a_r_g_v_N_a_m_e, _d_b_N_a_m_e, _d_b_C_l_a_s_s,
  561.      _d_e_f_V_a_l_u_e, and current value.  The current value is computed from the
  562.      appropriate field of _w_i_d_g_R_e_c by calling procedures like TTTTkkkk____NNNNaaaammmmeeeeOOOOffffCCCCoooolllloooorrrr.
  563.  
  564.      If the _a_r_g_v_N_a_m_e argument to TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeIIIInnnnffffoooo is non-NULL, then it
  565.      indicates a single option, and information is returned only for that
  566.      option.  The string placed in _i_n_t_e_r_p->_r_e_s_u_l_t will be a list containing
  567.      two or five values as described above;  this will be identical to the
  568.      corresponding sublist that would have been returned if _a_r_g_v_N_a_m_e had been
  569.      NULL.
  570.  
  571.      The _f_l_a_g_s argument to TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeIIIInnnnffffoooo is used to restrict the _s_p_e_c_s
  572.      entries to consider, just as for TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt.
  573.  
  574.  
  575. TTTTKKKK____CCCCOOOONNNNFFFFIIIIGGGGUUUURRRREEEEVVVVAAAALLLLUUUUEEEE
  576.      TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeVVVVaaaalllluuuueeee takes arguments similar to TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeIIIInnnnffffoooo; instead of|
  577.      returning a list of values, it just returns the current value of the     |
  578.      option given by _a_r_g_v_N_a_m_e (_a_r_g_v_N_a_m_e must not be NULL).  The value is      |
  579.      returned in _i_n_t_e_r_p->_r_e_s_u_l_t and TCL_OK is normally returned as the        |
  580.      procedure's result.  If an error occurs in TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeVVVVaaaalllluuuueeee (e.g.,      |
  581.      _a_r_g_v_N_a_m_e is not a valid option name), TCL_ERROR is returned and an error |
  582.      message is left in _i_n_t_e_r_p->_r_e_s_u_l_t.  This procedure is typically called to|
  583.      implement ccccggggeeeetttt widget commands.
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.                                                                         PPPPaaaaggggeeee 9999
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598. TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt((((3333TTTTkkkk))))                                TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt((((3333TTTTkkkk))))
  599.  
  600.  
  601.  
  602. TTTTKKKK____FFFFRRRREEEEEEEEOOOOPPPPTTTTIIIIOOOONNNNSSSS
  603.      The TTTTkkkk____FFFFrrrreeeeeeeeOOOOppppttttiiiioooonnnnssss procedure may be invoked during widget cleanup to
  604.      release all of the resources associated with configuration options.  It
  605.      scans through _s_p_e_c_s and for each entry corresponding to a resource that
  606.      must be explicitly freed (e.g. those with type TK_CONFIG_COLOR), it frees
  607.      the resource in the widget record.  If the field in the widget record
  608.      doesn't refer to a resource (e.g.  it contains a null pointer) then no
  609.      resource is freed for that entry.  After freeing a resource,
  610.      TTTTkkkk____FFFFrrrreeeeeeeeOOOOppppttttiiiioooonnnnssss sets the corresponding field of the widget record to null.
  611.  
  612.  
  613. CCCCUUUUSSSSTTTTOOOOMMMM OOOOPPPPTTTTIIIIOOOONNNN TTTTYYYYPPPPEEEESSSS
  614.      Applications can extend the built-in configuration types with additional
  615.      configuration types by writing procedures to parse and print options of
  616.      the a type and creating a structure pointing to those procedures:
  617.  
  618.           typedef struct Tk_CustomOption {
  619.               Tk_OptionParseProc *_p_a_r_s_e_P_r_o_c;
  620.               Tk_OptionPrintProc *_p_r_i_n_t_P_r_o_c;
  621.               ClientData _c_l_i_e_n_t_D_a_t_a;
  622.           } Tk_CustomOption;
  623.  
  624.           typedef int Tk_OptionParseProc(
  625.               ClientData _c_l_i_e_n_t_D_a_t_a,
  626.               Tcl_Interp *_i_n_t_e_r_p,
  627.               Tk_Window _t_k_w_i_n,
  628.               char *_v_a_l_u_e,
  629.               char *_w_i_d_g_R_e_c,
  630.               int _o_f_f_s_e_t);
  631.  
  632.           typedef char *Tk_OptionPrintProc(
  633.               ClientData _c_l_i_e_n_t_D_a_t_a,
  634.               Tk_Window _t_k_w_i_n,
  635.               char *_w_i_d_g_R_e_c,
  636.               int _o_f_f_s_e_t,
  637.               Tcl_FreeProc **_f_r_e_e_P_r_o_c_P_t_r);
  638.  
  639.  
  640.      The Tk_CustomOption structure contains three fields, which are pointers
  641.      to the two procedures and a _c_l_i_e_n_t_D_a_t_a value to be passed to those
  642.      procedures when they are invoked.  The _c_l_i_e_n_t_D_a_t_a value typically points
  643.      to a structure containing information that is needed by the procedures
  644.      when they are parsing and printing options.
  645.  
  646.      The _p_a_r_s_e_P_r_o_c procedure is invoked by TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt to parse a
  647.      string and store the resulting value in the widget record.  The
  648.      _c_l_i_e_n_t_D_a_t_a argument is a copy of the _c_l_i_e_n_t_D_a_t_a field in the
  649.      Tk_CustomOption structure.  The _i_n_t_e_r_p argument points to a Tcl
  650.      interpreter used for error reporting.  _T_k_w_i_n is a copy of the _t_k_w_i_n
  651.      argument to TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt.  The _v_a_l_u_e argument is a string
  652.      describing the value for the option;  it could have been specified
  653.      explicitly in the call to TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt or it could come from the
  654.  
  655.  
  656.  
  657.                                                                        PPPPaaaaggggeeee 11110000
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664. TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt((((3333TTTTkkkk))))                                TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt((((3333TTTTkkkk))))
  665.  
  666.  
  667.  
  668.      option database or a default.  _V_a_l_u_e will never be a null pointer but it
  669.      may point to an empty string.  _R_e_c_o_r_d_P_t_r is the same as the _w_i_d_g_R_e_c
  670.      argument to TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt;  it points to the start of the widget
  671.      record to modify.  The last argument, _o_f_f_s_e_t, gives the offset in bytes
  672.      from the start of the widget record to the location where the option
  673.      value is to be placed.  The procedure should translate the string to
  674.      whatever form is appropriate for the option and store the value in the
  675.      widget record.  It should normally return TCL_OK, but if an error occurs
  676.      in translating the string to a value then it should return TCL_ERROR and
  677.      store an error message in _i_n_t_e_r_p->_r_e_s_u_l_t.
  678.  
  679.      The _p_r_i_n_t_P_r_o_c procedure is called by TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeIIIInnnnffffoooo to produce a string
  680.      value describing an existing option.  Its _c_l_i_e_n_t_D_a_t_a, _t_k_w_i_n, _w_i_d_g_R_e_c, and
  681.      _o_f_f_s_e_t arguments all have the same meaning as for Tk_OptionParseProc
  682.      procedures.  The _p_r_i_n_t_P_r_o_c procedure should examine the option whose
  683.      value is stored at _o_f_f_s_e_t in _w_i_d_g_R_e_c, produce a string describing that
  684.      option, and return a pointer to the string.  If the string is stored in
  685.      dynamically-allocated memory, then the procedure must set *_f_r_e_e_P_r_o_c_P_t_r to
  686.      the address of a procedure to call to free the string's memory;
  687.      TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeIIIInnnnffffoooo will call this procedure when it is finished with the
  688.      string.  If the result string is stored in static memory then _p_r_i_n_t_P_r_o_c
  689.      need not do anything with the _f_r_e_e_P_r_o_c_P_t_r argument.
  690.  
  691.      Once _p_a_r_s_e_P_r_o_c and _p_r_i_n_t_P_r_o_c have been defined and a Tk_CustomOption
  692.      structure has been created for them, options of this new type may be
  693.      manipulated with Tk_ConfigSpec entries whose _t_y_p_e fields are
  694.      TK_CONFIG_CUSTOM and whose _c_u_s_t_o_m_P_t_r fields point to the Tk_CustomOption
  695.      structure.
  696.  
  697.  
  698. EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  699.      Although the explanation of TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeWWWWiiiiddddggggeeeetttt is fairly complicated, its
  700.      actual use is pretty straightforward.  The easiest way to get started is
  701.      to copy the code from an existing widget.  The library implementation of
  702.      frames (tkFrame.c) has a simple configuration table, and the library
  703.      implementation of buttons (tkButton.c) has a much more complex table that
  704.      uses many of the fancy _s_p_e_c_F_l_a_g_s mechanisms.
  705.  
  706.  
  707. KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  708.      anchor, bitmap, boolean, border, cap style, color, configuration options,
  709.      cursor, custom, double, font, integer, join style, justify, millimeters,
  710.      pixels, relief, synonym, uid
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.                                                                        PPPPaaaaggggeeee 11111111
  724.  
  725.  
  726.  
  727.